package Day13;

import java.io.*;

public class Text2 {
    public static void main(String[] args) throws IOException {
       /* FileInputStream file = new FileInputStream("Day_01/a.txt");
        byte[] byte2 = new byte[2];
        int len = file.read(byte2);
        System.out.println(len);
        //把字符变为字符串
        String str3 = new String(byte2,0,len);
        System.out.println(str3);

        int len1 = file.read(byte2);
        System.out.println(len1);
        String str4 = new String(byte2,0,len1);
        System.out.println(str4);

        int len2 = file.read(byte2);
        System.out.println(len2);
        String str6 = new String(byte2,0,len2);
        System.out.println(str6);
*/
      /*  FileInputStream file = new FileInputStream("Day_01/a.txt");
        byte[]  byte1 = new byte[2];
        int len1 = file.read(byte1);
        String str1 = new String(byte1,0,len1);
        System.out.println("长度是" + len1+ "打印的内容是" + str1);

        int len2 = file.read(byte1);
        String str3 = new String(byte1,0,len2);
        System.out.println("长度是" + len2+ "打印的内容是" + str3);

        int len3 = file.read(byte1);
        String str4 = new String(byte1,0,len3);
        System.out.println("长度是" + len3+ "打印的内容是" + str4);*/
/*

        FileInputStream fos = new FileInputStream("Day_01/a.txt");
        byte[] byte1 = new byte[2];
        int len = fos.read(byte1);
        System.out.println(len);
        String str1 = new String(byte1,0,len);
        System.out.println(str1);


        int len2 = fos.read(byte1);
        System.out.println(len2);
        String str2 = new String(byte1,0,len2);
        System.out.println(str2);

        int len3 = fos.read(byte1);
        System.out.println(len3);
        String str3 = new String(byte1,0,len3);
        System.out.println(str3);

        int len5 = fos.read(byte1);
        System.out.println(len5);
        String str9;
        str9 = new String(byte1,0,len5);
        System.out.println(str9);




*/
        FileInputStream file = new FileInputStream("Day_01/a.txt");
        byte[] byte1 = new byte[2];

        int len = file.read(byte1);
        System.out.println(len);

        String str1 = new String(byte1,0,len);
        System.out.println(str1);

        int len1 = file.read(byte1);
        System.out.println(len1);
        String str2 = new String(byte1,0,len1);
        System.out.println(str2);


        int len3 = file.read(byte1);
        System.out.println(len3);
        String str4 = new String(byte1,0,len3);
        System.out.println(str4);
        file.close();

    }

}
